package client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import pojo.log.assetImport.AssetImport;
import pojo.log.assetLog.AssetLog;
import pojo.log.assetSecondment.AssetSecondment;

import java.util.List;

/**
 * @author HGD
 * @date 2022/10/3 20:57
 */
@FeignClient("log")
public interface LogClient {
    //----------------------AssetImport-------------------------------

    /**
     * 根据资产管理员id搜索入库申请列表
     *
     * @param assetManagerId 资产管理员id
     * @return 入库申请列表
     */
    @PostMapping("/assetImport/getAssetImportsByAssetManagerId")
    List<AssetImport> getAssetImportsByAssetManagerId(@RequestBody Long assetManagerId);

    /**
     * 根据仓库id获取到对应的资产入库列表
     *
     * @param repositoryId 仓库id
     * @return 资产入库列表
     */
    @PostMapping("/assetImport/getAssetImportsByRepositoryId")
    List<AssetImport> getAssetImportsByRepositoryId(@RequestBody Long repositoryId);

    //-----------------getAssetLogsByAssetId---------------------------

    /**
     * 根据资产id获取资产信息列表
     *
     * @param assetId 资产id
     * @return 资产信息列表
     */
    @PostMapping("/assetLog/getAssetLogsByAssetId")
    List<AssetLog> getAssetLogsByAssetId(@RequestBody Long assetId);

    //--------------------AssetSecondment------------------------------

    /**
     * 修改资产借调
     *
     * @param assetSecondment 资产借调
     * @return 是否修改成功
     */
    @PostMapping("/assetSecondment/updateAssetSecondmentById")
    Boolean updateAssetSecondmentById(@RequestBody AssetSecondment assetSecondment);

    /**
     * 获取资产借调
     *
     * @param assetSecondment 资产借调
     * @return 资产借调申请列表
     */
    @PostMapping("/assetSecondment/getAssetSecondments")
    List<AssetSecondment> getAssetSecondments(@RequestBody AssetSecondment assetSecondment);

}
